<template>
  <el-dialog title="查看学籍信息" :visible.sync="dialogVisible" width="1000px">
    <el-row :gutter="20">
        <el-divider content-position="left">
          <h5>{{cert_name}}学历信息</h5>
        </el-divider>
        <el-row :gutter="20">
          <el-col :span="8" style="text-align:center;border: 0px;height: 25px;">
            <div class="grid-content bg-purple">
              学历生成时间：{{start_at}}
            </div>
          </el-col>
        </el-row>
      </el-row>
      <el-row :gutter="20">
        <el-divider content-position="left">
          <h5>学历详细信息</h5>
        </el-divider>
        <el-descriptions v-if="eduId==''" class="margin-top" :column="2" border>
          <el-descriptions-item label="层次">{{eduList.resp_data?eduList.resp_data.result:'高中及高中以下'}}</el-descriptions-item>
          <el-descriptions-item label="姓名">{{cert_name}}</el-descriptions-item>
          <el-descriptions-item label="证件号码">{{cert_no}}</el-descriptions-item>
          <el-descriptions-item label="手机号码">{{mobile}}</el-descriptions-item>
        </el-descriptions>
      </el-row>
    <div slot="footer" class="dialog-footer">
      <el-button type="primary" @click="dialogVisible = false">关闭</el-button>
    </div>
  </el-dialog>
</template>

<script>
import { getEduData } from '@/api/order'
import customPage from '@/components/customPage'
export default {
  components: { customPage },
  // props: ['orderId'],
  props: {
    eduId: {
      type: String,
      default: ''
    },
    editItem: {
      type: Object,
      default: ()=>({})
    },
  },
  data() {
    return {
      dialogVisible: false,
      eduList:{},
      cert_name:'',
      cert_no:'',
      mobile:'',
      start_at:''
    }
  },
  watch: {
    dialogVisible(val) {
      if (val) {
        this.$nextTick(() => {
          this.getList()
        })
      }
    }
  },
  methods: {
    getList() {
      const params = {eduNum:this.eduId,cert_name:this.editItem.cert_name,cert_no:this.editItem.cert_no,mobile:this.editItem.mobile}
      getEduData(params).then(res => {
        // console.log("123",res);
        this.eduList=res
        this.cert_name=res.cert_name
        this.cert_no=res.cert_no
        this.mobile=res.mobile
        this.start_at=res.start_at
      })
    }
  }
}
</script>

<style lang="scss" scoped>
</style>
